package com.dong.auth.module.oauth2.controller;

import com.dong.common.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class LoginController {

    @ResponseBody
    @GetMapping("/foo/resource")
    public Result<String> getResource() {
        return Result.success("你终于有权限访问到我啦！");
    }

    @GetMapping("/login")
    public String loginPage() {
        return "login";
    }
    @GetMapping("/")
    public String index() {
        return "index";
    }
}
